Skip to content

feat: add tab-aware terminal/server context#236

Open
nkabbara wants to merge 2 commits intonickjvandyke:mainfrom
nkabbara:feature/support-tab-context-upstream
Open

feat: add tab-aware terminal/server context#236
nkabbara wants to merge 2 commits intonickjvandyke:mainfrom
nkabbara:feature/support-tab-context-upstream

Conversation

@nkabbara
Copy link
Copy Markdown
Contributor

Summary

  • Make terminal state tab-scoped (toggle/open/close)
  • Make connected server + SSE subscription tab-scoped
  • Use tab-local context in Server.get and related UI callsites

@nkabbara
Copy link
Copy Markdown
Contributor Author

Hey @nickjvandyke!

I'm updating my workflow to use git worktrees where each tab in nvim is bound to a worktree. I was having issues with the plugin because of tab interference. ie. tabs are many to one (opencod). This scopes opencode terms/instances to different tabs.

Do you forrsee merging this (or something similar/better)?

@nkabbara nkabbara marked this pull request as ready for review April 17, 2026 14:23
@nickjvandyke
Copy link
Copy Markdown
Owner

Hmm this is a great point. I have thought about supporting multiple simultaneous connections, at least for SSEs. But it introduces complications like how to select a server when prompting. By tab is a neat idea, but we need a more general solution. (or maybe not? if this only realistically happens in multi-tab workflows)

@nkabbara
Copy link
Copy Markdown
Contributor Author

nkabbara commented Apr 17, 2026

Hmm this is a great point. I have thought about supporting multiple simultaneous connections, at least for SSEs. But it introduces complications like how to select a server when prompting. By tab is a neat idea, but we need a more general solution. (or maybe not? if this only realistically happens in multi-tab workflows)

Yeah this is totally born out of a need of mine. But if someone still wants to control the same session, with this solution, they can still select it using server.select. Though, I think tabs in vim should be thought of as workspaces . E.G https://stackoverflow.com/questions/26708822/why-do-vim-experts-prefer-buffers-over-tabs

In the meantime I can work off of my fork until a decision is made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants